<template>
  <div class="mt-page-navigate" @tap="onTap">
    <div class="mt-page-navigate__content"><slot></slot></div>
    <div class="mt-page-navigate__action"></div>
    <view class="mt-page-navigate__clear" v-if="clear"><div class="mt-clear-btn"></div></view>
  </div>
</template>

<script>
  export default {
    behaviors: [],
    properties: {
      to: null,
      clear: {
        type: Boolean,
        value: false
      }
    },
    data() {
      return {
        
      }
    },
    attached: function () {
    },
    methods: {
    },
    handles: {
      onTap(e) {
        // let pages = getCurrentPages()
        let curPage = this.$curPage()
        if (this.data.to) {
          // this.$cache.set('mt-page-navigate-from', curPage.$pageName);
          this.$routePage(this.data.to)
        }
      }
    }
  }
</script>

<style lang="less">
</style>
